package com.iot08.api.controller;

import com.alibaba.fastjson.JSONObject;
import com.iot08.common.utils.DateUtil;
import com.iot08.common.utils.response.ResponseMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author weichao 1299101858@qq.com
 * @version 1.0
 * @date 3/2/22 7:03 PM
 */
@Slf4j
@RestController
@RequestMapping("getway")
public class CheckTimeController {
    @GetMapping("/check_time")
    public ResponseMap check_time(){
        JSONObject res = new JSONObject();
        res.put("time", DateUtil.nowTimestampToLong());
        log.info("赛诺部分手表时间校对:{}", res.toJSONString());
        return ResponseMap.success(res);
    }
}
